<%= form_for(@rent) do |f| %>
  <% if @rent.errors.any? %>
    <div id="error_explanation">
      <h2><%= pluralize(@rent.errors.count, "error") %> prohibited this rent from being saved:</h2>

      <ul>
      <% @rent.errors.full_messages.each do |msg| %>
        <li><%= msg %></li>
      <% end %>
      </ul>
    </div>
  <% end %>

  <div class="field">
    <%= f.label :customer_id %><br />
    <%= collection_select(:rent, :customer_id,  @customers,  :id, :name, 
      { :prompt   => "Please select a Customer"}, {}) %>
  </div>
  <div class="field">
    <%= f.label :product_id %><br />
     <%= collection_select(:rent, :product_id,  @products,  :id, :name, 
      { :prompt   => "Please select a Product to rent"}, {}) %>
  </div>
  <div class="field">
    <%= f.label :date %><br />
    <%= f.datetime_select :date %>
  </div>
  <div class="field">
    <%= f.label :expected_return %><br />
    <%= f.datetime_select :expected_return %>
  </div>
  <div class="field">
    <%= f.label :day_charge %><br />
    $<%= f.text_field :day_charge %>
  </div>
  <div class="field">
    <%= f.label :contact_name %><br />
    <%= f.text_field :contact_name %>
  </div>
  <div class="field">
    <%= f.label :contact_num %><br />
    <%= f.text_field :contact_num %>
  </div>
  <div class="field">
    <%= f.label :deposit %><br />
    <%= f.text_field :deposit %>
  </div>
  <div class="actions">
    <%= f.submit %>
  </div>
<% end %>
